﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RDC.DATA.Class
{
   public class Location
    {
        #region Champs
        private string _city ="inconnu";
        private string _country="inconnu";
        private string _street="inconnu";
        private string _postalCode="inconnu";
        private string _longitude="inconnu";
        private string _latitude ="inconnu";


        
        /// API Key: 24a03f3944e49e33b73e71f73cc5352d
        /// Secret: is 91b24bd3033027af2f036c201697b9cf


        #endregion

        #region champsEncapsuler
            public string city
    {
      get { return _city; }
      set { _city = value; }
    }
        
    public string country
    {
      get { return _country; }
      set { _country = value; }
    }
            public string street
    {
      get { return _street; }
      set { _street = value; }
    }
           public string postalCode
    {
      get { return _postalCode; }
      set { _postalCode = value; }
    }
           public string latitude
           {
               get { return _latitude; }
               set { _latitude = value; }
           }

           public string longitude
           {
               get { return _longitude; }
               set { _longitude = value; }
           }
        
        #endregion

        #region construct
        /// <summary>
        /// Constructeur par défaut
        /// </summary>
        public Location() { }
        /// <summary>
        /// Instanciation de la classe Location
        /// </summary>
        /// <param name="city">Nom de la ville</param>
        /// <param name="country">Nom de la regioj</param>
        /// <param name="street"> b</param>
        /// <param name="postalCode"></param>
        public Location(string city, string country,string street,string postalCode,string longitude, string latitude) 
        {
            this.city = city;
            this.country = country;
            this.street = street;
            this.postalCode = postalCode;
            this.latitude = latitude;
            this.longitude = longitude;


        }
        public Location(string longitude, string latitude)
        {

            this.longitude = longitude;
            this.latitude = latitude;
        }
        public Location(string city, string country, string street, string postalCode)
        {
            this.city = city;
            this.country = country;
            this.street = street;
            this.postalCode = postalCode;

        }
       
        
        #endregion

        #region Méthodes

     

        #endregion

        #region Méthodes redéfinies
        /// <summary>
        /// Obtient les informations  de la ville
        /// </summary>
        /// <returns>Nom de la ville, sa region rue et code Postal .</returns>
        public override string ToString()
        {
            return "Nom de la ville " +city + "region : " + country  + "street : " + street  + "codePostal : " +postalCode;
        }
        #endregion
            }   
    }

